import 'package:flutter/material.dart';
import 'package:mysql1/mysql1.dart';

class SignalInfo{
  int id = 0;
  String sls3Adr = "";
  String bit7 = "";
  String bit6 = "";
  String bit5 = "";
  String bit4 = "";
  String bit3 = "";
  String bit2 = "";
  String bit1 = "";
  String bit0 = "";

  Color bit7bg = Colors.transparent;
  Color bit6bg = Colors.transparent;
  Color bit5bg = Colors.transparent;
  Color bit4bg = Colors.transparent;
  Color bit3bg = Colors.transparent;
  Color bit2bg = Colors.transparent;
  Color bit1bg = Colors.transparent;
  Color bit0bg = Colors.transparent;

  static  SignalInfo builder(ResultRow row) {
    SignalInfo signalInfo = SignalInfo();
    signalInfo.id = row[0];
    signalInfo.sls3Adr = null==row[1]?"":row[1].toString();
    signalInfo.bit7 = null==row[2]?"":row[2].toString();
    signalInfo.bit6 = null==row[3]?"":row[3].toString();
    signalInfo.bit5 = null==row[4]?"":row[4].toString();
    signalInfo.bit4 = null==row[5]?"":row[5].toString();
    signalInfo.bit3 = null==row[6]?"":row[6].toString();
    signalInfo.bit2 = null==row[7]?"":row[7].toString();
    signalInfo.bit1 = null==row[8]?"":row[8].toString();
    signalInfo.bit0 = null==row[9]?"":row[9].toString();
    return signalInfo;
  }
}